import { defineEventHandler } from 'h3'
import { sqlConnection } from '~/server/utils/mysql.util'
export default defineEventHandler(async () => {
    const [rows, fiedls] = await sqlConnection().execute('select * from hsxy_dictionary')
    return {
        data: rows,
        success: true,
        message: '搜索成功',
        total: (rows as Array<any>).length
    }
})